import request from '@/utils/request'

// 查询仓库列表
export function listBasWarehouse(query) {
  return request({
    url: '/bas/basWarehouse/list',
    method: 'get',
    params: query
  })
}

// 查询用户下拉框
export function listUserOptions(query) {
  return request({
    url: '/bas/basWarehouse/userOptions',
    method: 'get',
    params: query
  })
}

// 查询仓库详细
export function getBasWarehouse(warehouseId) {
  return request({
    url: '/bas/basWarehouse/' + warehouseId,
    method: 'get'
  })
}

// 新增仓库
export function addBasWarehouse(data) {
  return request({
    url: '/bas/basWarehouse',
    method: 'post',
    data: data
  })
}

// 修改仓库
export function updateBasWarehouse(data) {
  return request({
    url: '/bas/basWarehouse',
    method: 'put',
    data: data
  })
}

// 删除仓库
export function delBasWarehouse(warehouseId) {
  return request({
    url: '/bas/basWarehouse/' + warehouseId,
    method: 'delete'
  })
}
